﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ListenMusic.Singer_ServiceReferences;
using System.ServiceModel;
namespace ListenMusic.Models.Public
{
    public class SingerRepository
    {
        SingerServiceClient singer_client = new SingerServiceClient("WSHttpBinding_ISingerService");
        public List<Singer> getSingerByCountry(int CountryID)
        {
            try
            {
                Singer[] singer = singer_client.getAllSingerByContry(CountryID);
                return singer.ToList();
            }
            catch (FaultException ex)
            {
                throw ex;
            }
        }
        public Singer getSinger_bySingerID(int singerid)
        {
            try
            {
                Singer singer = singer_client.getSinger_bySingerID(singerid);
                return singer;
            }
            catch (FaultException ex)
            {
                throw ex;
            }
        }
    }
}